﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using LogicServer;
using Model;
using CommonCs;

namespace BugSysSolution.RequestAjaxPage
{
    public partial class MasterPageAjaxPage : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            String tag = Request["tag"] ?? String.Empty;
            if (tag == "getalltype")
            {
                GetAllTypes();
            }
        }

        private void GetAllTypes()
        {
            List<BugTypes> list = new List<BugTypes>();
            BugTypesLogic bl = new BugTypesLogic();
            list = bl.GetAllType();
            if (list == null)
            {
                Response.Write("");
            }
            else
            {
                Response.Write(Common.DataTableToJson(Common.ListToDataTable<BugTypes>(list)));
            }
        }
    }
}